<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
	<script type="text/javascript">
		/*
			switch(表达式){
				case value1: //表达式和value1做全等比较
					content1;//表达式===value1,执行该代码
					break;//跳出分支语句

				case value2:
					content2;
					break;
				...

				default:
					content;//没有表达式相等就会执行该代码
			}
		*/
		let res = Number(prompt("请输入温度"))

		switch(res){
			case  0 :
					console.log("厚外套")
					break;
			case  10 :
					console.log("短袖")
					break;
			case  20 :
					console.log("吊带")
					break;
			default:
				console.log("裸奔")
		}

		// 请输入月份 返回这个月有几天
		let month = Number(prompt("请输入月份（1-12）: "))

		switch(month){
			 case 1: case 3: case 5: case 7: case 8: case 10: case 12:
    		 	console.log("31天")
   	 	 	 	break;
   	 	 	 case 4: case 6: case 9: case 11:
    		 	console.log("30天")
    			 break;
    		 case 2:
    		 	console.log("28天")
    		 	break;
    		 default:
    		 	console.log("无效月份")

		}
	</script>
</body>
</html>